<template>
    <div>
      数据传递
        <!-- <Parent @zdyplay="play"></Parent>
        <button @click="$broadcast('drink','grandson','val')">触发grandson的drink</button> -->
        <hr>
        <Test a="1" b="2" c="3" d="4" :bl="msg" @click="fn2"></Test>
    </div>
</template>
<script>
//1.定义组件  2.引入  3.注册  4.使用
import Parent from "../components/parent.vue"
import Test from "../components/test.vue"
export default{
    data(){
        return{
            msg:'hello',
        }
    },
    components:{
        Parent,
        Test
    },
    methods:{
        play(value){
            console.log('play',value)
        },
        fn2(){
            console.log('fn2')
        }
    }
}
</script>
<style scoped>

</style>
